﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>新增RSI周线强势股分析</title>
</head>
<body>
  <h2>新增RSI周线强势股分析</h2>

<?php
  $stock_code = $_POST['stock_code'];
  $rsi = $_POST['rsi'];
  $analysis = $_POST['analysis'];

  $dbc = mysqli_connect('localhost', 'root', 'k00l@1D;', 'gudahu')
    or die('Error connecting to MySQL server.');
  mysqli_set_charset($dbc, 'utf8');
  
  $query = "INSERT INTO rsi_week_toper (stock_code, rsi, analysis) " .
    "VALUES ('$stock_code', '$rsi', '$analysis')";

  $result = mysqli_query($dbc, $query)
    or die('Error querying database.');

  mysqli_close($dbc);

  echo '新增的RSI周线强势股信息.<br />';
  echo '股票代码 ' . $stock_code . '<br />';
  echo '周线RSI ' . $rsi . '<br />';
  echo '简析 ' . $analysis . '<br />';  
?>

</body>
</html>
